package com.cap.dreamcircle.Model.Bean;

import com.cap.dreamcircle.Utils.PreferenceUtils;

import java.util.List;

/**
 * Created by liucxu on 2017/8/11.
 */

public class DreamDetailBean extends BaseBean {

    private List<CommentEntity> commentArray;
    private String dreamUserId;
    private String dreamId;
    private String createTime;
    private String dreamText;
    private String dreamVoiceUrl;
    private String dreamType;
    private int likeCount;
    private String hasLike;
    private int commentCount;
    private String nickName;
    private int audio_length;
    private String headImgUrl;

    public List<CommentEntity> getCommentArray() {
        return commentArray;
    }

    public void setCommentArray(List<CommentEntity> commentArray) {
        this.commentArray = commentArray;
    }

    public String getDreamUserId() {
        return dreamUserId;
    }

    public void setDreamUserId(String dreamUserId) {
        this.dreamUserId = dreamUserId;
    }

    public String getDreamId() {
        return dreamId;
    }

    public void setDreamId(String dreamId) {
        this.dreamId = dreamId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getDreamText() {
        return dreamText;
    }

    public void setDreamText(String dreamText) {
        this.dreamText = dreamText;
    }

    public String getDreamVoiceUrl() {
        return dreamVoiceUrl;
    }

    public void setDreamVoiceUrl(String dreamVoiceUrl) {
        this.dreamVoiceUrl = dreamVoiceUrl;
    }

    public String getDreamType() {
        return dreamType;
    }

    public void setDreamType(String dreamType) {
        this.dreamType = dreamType;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public String getHasLike() {
        return hasLike;
    }

    public void setHasLike(String hasLike) {
        this.hasLike = hasLike;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getAudio_length() {
        return 30;
    }

    public void setAudio_length(int audio_length) {
        this.audio_length = audio_length;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public boolean isMyRecord() {
        if (PreferenceUtils.GetUserId().equals(this.dreamUserId)) {
            return true;
        }
        return false;
    }

    public boolean isLiked() {
        if ("y".equals(this.hasLike)) {
            return true;
        }
        return false;
    }
}
